﻿using System;
using System.Collections.Generic;
using System.Text;

namespace CodeCreator.CoreObj
{
    public class ObjField
    {
        private bool dbFieldPk=false;
        private string dbSequence = "";    
        private string dbFieldName;//JsFieldNameFirstLower,JsFieldNameFirstUpper,ClassFieldNameFirstUpper,ClassFieldNameFirstLower
        private string dbFieldType;
        private string dbFieldLength;
        private string classFieldType;
        private string jsFieldType;

        public bool DbFieldPk
        {
            get { return dbFieldPk; }
            set { dbFieldPk = value; }
        }

        public string DbSequence
        {
            get { return dbSequence; }
            set { dbSequence = value; }
        }

        public string DbFieldName
        {
            get { return dbFieldName; }
            set { dbFieldName = value; }
        }

        public string DbFieldType
        {
            get { return dbFieldType; }
            set { dbFieldType = value; }
        }

        public string DbFieldLength
        {
            get { return dbFieldLength; }
            set { dbFieldLength = value; }
        }

        public string ClassFieldType
        {
            get { return classFieldType; }
            set { classFieldType = value; }
        }

        public string ClassFieldNameFirstUpper
        {
            get
            {
                return Common.DbFirstToUpper(dbFieldName);
            }
        }

        public string ClassFieldNameFirstLower
        {
            get
            {
                return Common.DbFirstToLower(dbFieldName);
            }
        }

        public string JsFieldNameFirstUpper
        {
            get
            {
                return Common.DbFirstToUpper(dbFieldName);
            }
        }


        public string JsFieldNameFirstLower
        {
            get
            {
                return Common.DbFirstToLower(dbFieldName);
            }
        }

        public string JsFieldType
        {
            get { return jsFieldType; }
            set { jsFieldType = value; }
        }
    }
}
